<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台 - 跳转提示 </title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="{{$public}}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="{{$public}}/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{{$public}}/css/animate.min.css" rel="stylesheet">
    <link href="{{$public}}/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="middle-box text-center animated fadeInDown">
        <h2 class="font-bold">{{$message}}</h2>
        <!-- <h3 class="font-bold">{{$message}}</h3> -->

        <div class="error-desc">
            <p class="jump">
            页面自动 <a id="href" class="text-primary" href="{{$url}}">跳转</a> 等待时间： <b id="wait">{{$waitSecond}}</b>
            </p>
            <br/>？如果无法跳转,您可以点击返回看看
            <br/><a href="javascript:;" onclick="javascript:history.back(-1)" class="btn btn-primary m-t">返回</a>
        </div>
        
    </div>
    <script src="{{$public}}/js/jquery.min.js"></script>
    <script src="{{$public}}/js/bootstrap.min.js?v=3.3.6"></script>
</body>
<script type="text/javascript">
var href = document.getElementById('href').href
document.onkeydown=function(event){
    location.href = href;
    /*var e = event || window.event || arguments.callee.caller.arguments[0];
    if(e) location.href = href;
    if(e && e.keyCode==27){ // 按 Esc
        location.href = href;
    }
    if(e && e.keyCode==13){ // enter 键
        location.href = href;
    }*/
};
(function(){
var wait = document.getElementById('wait');
var interval = setInterval(function(){
    var time = --wait.innerHTML;
    if(time <= 0) {
        location.href = href;
        clearInterval(interval);
    };
}, 1000);
})();
</script>

</html>
